<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> 属性操作 </title>
    <style>
        body{
            text-align: center;
        }
    </style>
</head>
<body>

    <img src="./test1/images/head01.jpg" alt="">
    <button>切换</button>
    
</body>
<script src="../lib/font/jquery.min.js"></script>
<script>
    let n = 1;
    $(function(){
        $('button').click(function(){
            let src = `./test1/images/head0${n%3 +1}.jpg`;
            n++;
            $('img').attr('src',src);
        })
        
    });
</script>
</html>